/**
 * @project_name staff_vehicle
 * @package_name com.ssh.dao
 * @desc TODO
 * @param
 * @author jack
 * @date 2013-4-22
 * @time 下午10:55:00
 */
package com.ssh.dao;

import java.sql.Timestamp;
import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.SessionFactory;

import com.ssh.entity.VcarTable;
import com.ssh.entity.Vehicle;
import com.ssh.entity.Visitor;
import com.ssh.model.pdata.VVisitorMPData;

/**
 * @author jack
 *
 */
public class VisitorDAOImpl implements VisitorDAOI {

	private SessionFactory sessionFactory ;

	/* (non-Javadoc)
	 * @see com.ssh.dao.VisitorDAOI#addVisitor(com.ssh.entity.Visitor)
	 */
	@Override
	public Visitor addVisitor(Visitor visitor) {
		// TODO Auto-generated method stub
		try{
			sessionFactory.getCurrentSession().save(visitor);
		}
		catch(Exception e){
			e.printStackTrace();
			return null ;
		}

		return visitor;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VisitorDAOI#addVisitor(com.ssh.entity.Visitor[])
	 */
	@Override
	public int addVisitor(Visitor... visitors) {
		// TODO Auto-generated method stub
		return 0;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VisitorDAOI#deleteVisitor(java.lang.String[])
	 */
	@Override
	public int deleteVisitor(String... strings) {
		// TODO Auto-generated method stub
		return 0;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VisitorDAOI#deleteVisitorByVisitorId(java.lang.String)
	 */
	@Override
	public Visitor deleteVisitorByVisitorId(String visitorId) {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * @return the sessionFactory
	 */
	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VisitorDAOI#queryVisitor(java.lang.String[])
	 */
	@Override
	public List<Visitor> queryVisitor(String... strings) {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VisitorDAOI#queryVisitorByVisitorId(java.lang.String)
	 */
	@Override
	public Visitor queryVisitorByVisitorId(String visitorId) {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * @param sessionFactory the sessionFactory to set
	 */
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VisitorDAOI#updateVisitor(com.ssh.entity.Visitor)
	 */
	@Override
	public Visitor updateVisitor(Visitor visitor) {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see com.ssh.dao.VisitorDAOI#updateVisitor(com.ssh.entity.Visitor[])
	 */
	@Override
	public int updateVisitor(Visitor... staffs) {
		// TODO Auto-generated method stub
		return 0;
	}

}
